import React from 'react'
import {Menu} from 'antd'

const LeftMenu = ({quizzes, quizId, handleClick}) => (
  <Menu
    selectedKeys={[`${quizId}`]}
    onClick={handleClick}
    mode='inline'>
    {quizzes.map((quiz, index) =>
      (<Menu.Item key={quiz.id}>
        <span>第{index + 1}题</span>
        {quiz.onlineCodingName}
      </Menu.Item>))}
  </Menu>
)

export default LeftMenu
